bench_dir=$1
exec_bin=$2

pbs_dir=$bench_dir/pbs
create_pbs_bin=scripts/run_basic/sm1000/new_sed2.sh
mkdir -p $pbs_dir


# Check if the directory exists
if [ -d "$bench_dir" ]; then
    sh $create_pbs_bin $bench_dir $exec_bin correct_bench1      >   $pbs_dir/bench1.pbs
    sh $create_pbs_bin $bench_dir $exec_bin bench2              >   $pbs_dir/bench2.pbs
else
    echo "The bench_dir is not exist, please check!!!"
fi

log_folder=$(dirname $bench_dir)/log/$exec_bin
if [ -d "log_folder" ]; then
    rm -rf $log_folder
fi
